/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

/*
 * Copyright (c) 2014, Joyent, Inc.
 */

@import "__vms-list";
@import '__jobs-list';


#page-server {
  .server-disk-utilization-container {
    .make-sm-column(2, 0);
    .server-disk-utilization-circle {
      margin: 0 auto;
    }
  }
  .provisionable-disk,
  .provisioned-disk,
  .total-disk,
  .unreserved-disk,
  .reserved-disk {
    .make-sm-column(2, 0);

    margin-top: 20px;
    text-align: center;
    .value { font-size: 28px; font-weight: 200; }
    .title { text-transform: uppercase; color: #666;  font-size: 12px; }
  }

  .unreserved-disk, .total-disk { opacity: 0.5; }

  .memory-overview h5 {
    text-transform: uppercase;
  }
  .disk-overview h5 {
    text-transform: uppercase;
    margin-top: 20px;
  }
  .server-memory-utilization-container {
    .make-sm-column(2, 0);
    .server-memory-utilization-circle {
      margin: 0 auto;
    }
  }
  .headnode {
    font-size: 9px;
    padding: 2px 4px;
    color: #fff;
    background: #000;
  }
  .provisionable-memory,
  .provisioned-memory,
  .total-memory,
  .unreserved-memory,
  .reserved-memory {
    .make-sm-column(2, 0);

    margin-top: 20px;
    text-align: center;
    .value { font-size: 28px; font-weight: 200; }
    .title { text-transform: uppercase; color: #666;  font-size: 12px; }
  }

  .provisionable-disk .value,
  .provisioned-disk .value,
  .reserved-disk .value,
  .provisionable-memory .value,
  .provisioned-memory .value,
  .reserved-memory .value {
    font-weight: 400;
  }

  .provisionable-disk .value,
  .provisioned-disk .value,
  .provisionable-memory .value,
  .provisioned-memory .value,
  .reserved-disk .value,
  .reserved-memory .value,
  .total-disk .value,
  .unreserved-disk .value,
  .unreserved-memory .value,
  .total-memory .value {
    color: #888;
  }

  .unreserved-memory, .total-memory { opacity: 0.5; }

  .unreserved-disk,
  .unreserved-memory {
    border-left: 1px solid #aaa;
  }


  .server-page-header+.actions {
    .pull-right;
    margin-top: -94px;
    position: relative;
    z-index: 50;
  }
  .dropdown-menu .forget { color: red; }
  .dropdown-menu .factory-reset { color: red; }
  .notes-component-container {
    vertical-align: middle;
    display: inline-block;
    .notes-count {
      font-size: 18px;
      padding-top: 4px;
      padding-bottom: 5px;
      padding-left: 10px;
      padding-right: 10px;
    }
  }

  .vms-list {
    .__vms-list;
  }
  .jobs-list {
    .__jobs-list;
  }


  .key-value-list {
    width: 100%;
    .item { clear: both; .widget-content; }
    .item-label, .item-content { display: inline-block; }
    .item-label { font-weight: 400; color: #888;}
    .item-content {
      text-align: justify;
      overflow: visible;
      height: 20px;
      vertical-align: middle;
    }
    .change { overflow: hidden;}
  }

  .resource-status {
    .running { background: @brand-success; }
    .rebooting { background: @brand-warning; }
    .unknown { background: @state-danger-text; }
    .server-setting-up { background: @brand-warning; }
  }
  .rack .none { color: @gray-light;}

  .overview {
    .item {
      .make-row(0);
      .widget-content; }
    .item-label, .item-content {  }
    .item-label {
      .make-xs-column(4, 0);
    }
    .item-content {
      .make-xs-column(8, 0);
    }
  }

  table.hardware {
    .table;
    tbody th { width: 140px; }
  }

  table.traits {
   .table;
   .trait-value {
      white-space: pre-wrap;
      font-family: @font-family-monospace;
      font-size: 14px;
    }
  }

  a { cursor: pointer; }

  .disks {
    .disk {
      .widget-content;
      .name { display: inline-block; width: 40%; }
      .size { display: inline-block; width: 40%; }
    }
  }

  .change-platform { margin-left: 5px;}
  .change-platform-form {
    text-align: left;
  }


  .change-reservation-ratio { float: right; }
  .btn-reservation-ratio { display: none; }
  input.reservation-ratio {
    margin-top: -4px;
    padding: 4px 8px;
    margin-bottom: 0;
    text-align: left;
    width: 100px;
    display: inline-block;
    background: lighten(@state-warning-bg, 42%);
    border: none;
  }
  span.reservation-ratio {
    margin-top: -4px;
    padding: 0;
    display: inline-block;
    width: 140px;
  }

  .change-reserve { float: right;}

  .enabled { color: @brand-success; }
  .disabled { color: @state-danger-text; }

  .server-nics {
    li+li {
      border-top: none;
    }
    .title {
      text-transform: uppercase;
      font-size: 10px;
      padding: 3px 6px;
      color: #888;
    }
    li.empty {
      font-size: 12px;
      color: @gray-light;
    }
    li {
      .widget-content;
      & > div {
        display: inline-block;
        vertical-align: top;
      }
      .link-status.aggr-link-status {
        margin-top: 6px;
      }
      .aggr-name-container {
        font-size: 10px;
        width: 120px;
        font-weight: bold;
        margin-left: 10px;
      }
      .aggr-ips-container {
        font-family: @font-family-monospace;
        font-size: 10px;
        width: 200px;
        color: @gray;
        .ip {
          padding: 4px 6px;
          display: inline-block;
          margin-left: 5px;
          background: #fff;
        }
      }
      .aggr-nictags-container {
        font-family: @font-family-monospace;
        font-size: 10px;
        width: 200px;
        color: @gray;
        .nictags {
          margin-left: 15px;
          display: inline-block;
          padding: 4px 6px;
          .nictag {
            padding: 4px 6px;
            background: @state-info-bg;
            color: @state-info-text;
            font-size: 10px;
            margin-left: 5px;
          }
        }
      }
      .lacp-container {
        font-family: @font-family-monospace;
        font-size: 10px;
        width: 200px;
        color: @gray;
        .lacp {
          display: inline-block;
          padding: 4px 6px;
          margin-left: 5px;
          .off, .active, .passive {
            background: #fff;
            padding: 4px 6px;
            font-size: 10px;
            text-transform: uppercase;
          }
         .passive { color: #888; }
         .active { color: @brand-success; }
       }

      }
      .interfaces-container {
        font-size: 10px;
        font-family: @font-family-monospace;
        color: @gray;
        width: auto;
        .interfaces {
          margin-left: 15px;
          display: inline-block;
          padding: 4px 6px;
        }
        .interface {
          padding: 4px 6px;
          background: @state-info-bg;
          color: @state-info-text;
          font-size: 10px;
          margin-left: 5px;
        }
      }

      padding: 8px;

      .name-container { width: 160px; }
      .ip-container { width: 140px; }
      .netmask-container { width: 140px; }
      .vlan-id-container { width: 80px;}
      .resolvers-container { width: 150px; }
      .nic-tag-container { width: 100px;}
      .nic-tags-provided-container { width: 100px;}

      .name {
        display: block;
        font-family: @font-family-monospace;
        font-size: 12px;
        font-weight: bold;
      }
      .mac {
        display: block;
        font-family: @font-family-monospace;
        font-size: 10px;
        color: @gray-light;
      }

      .link-status {
        border-radius: 2px;
        margin: 0 12px;
        margin-top: 14px;
        width: 20px;
        height: 6px;
        background: @gray-dark; }

      .link-status.up { background: @brand-success; }

      .lbl {
        font-family: @font-family-monospace;
        font-size: 10px;
        color: @gray-light;
        display: block;
      }
      .value {
        font-family: @font-family-monospace;
        font-size: 10px;
        display: block;
        color: @gray-darker;
      }

    }
  }

  .platform {
    .item {
      .widget-content;
      .make-row(0);
    }
    .item-label {
      .make-xs-column(4, 0);
    }
    .item-content {
      .make-xs-column(8, 0);
    }
  }
  .rack > * { vertical-align: top; font-size: 10p x;}

  .serial-console {
    overflow: hidden;
    margin-top: 10px;
    input { width: 100px;}

    .item-content { width: 110px; text-align: right;}
    .change { padding: 8px; }
  }
}
